home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / ezmouse2.zip / EZMOUSE.Q&A < prev    next >
Text File  |  1996-05-11  |  4KB  |  78 lines

  1. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. *               COMMON QUESTIONS AND ANSWERS FOR EZ-MOUSE 1.0                *
  3. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  4.  
  5. Question: I just installed the mouse, but I don't see any cursor on the 
  6.           screen!
  7.  
  8. Answer: You need to call the procedure ShowMouse.
  9.  
  10. Question: How can I tell if a button or buttons is/are being held down?
  11.  
  12. Answer: Make a call to ButtonPress, and pass it either LEFT_BUTTON, or 
  13.         RIGHT_BUTTON, depending on what button you need info on.
  14.  
  15. Question: In graphics mode, the computer seems to freeze.  What the heck's
  16.           wrong with your program?!?!?
  17.  
  18. Answer: It isn't freezing.  In text mode, when you first call InstallMouse,
  19.         you see text displayed on the screen.  However, in graphics mode
  20.         you don't see any text.  You just get the 12 second delay.  So wait
  21.         12 seconds, and the mouse will be installed and the computer will
  22.         "unfreeze".
  23.  
  24. Question: After waiting 12 seconds for InstallMouse, the entire screen changes
  25.           color!  What gives?
  26.  
  27. Answer: This may or may not happen.  The solution would be to call 
  28.         InstallMouse at the beginning of your code, then clear the screen to
  29.         remove the color.
  30.  
  31. Question: I still don't understand what's up with this MouseType enumeration
  32.           thing.  Help me!
  33.  
  34. Answer: An enumeration is this: when you declare an enum (as they are called),
  35.         you call it as such: AN_ENUM = (VAL0, VAL1, VAL2, VAL3, VAL4...).  
  36.         VAL0 is equal to 0, VAL1=1, VAL2=2, etc.  However, there is no value 0 
  37.         for MouseType.  It's called UNDEF.  Don't worry about it.
  38.         So in your code, you could make decisions such as:
  39.         IF MouseType=PS2 then.....
  40.         instead of writing:  
  41.         IF MouseType=4
  42.         It's just an easier way to identify what type of mouse it is.
  43.  
  44. Question: I don't understand the ChangeCursor procedure, can you help me?
  45.  
  46. Answer: Yes.  First of all, you have to create a mouse cursor, using an
  47.         editor (see the file EZMOUSE.DOC for info on where to get them).
  48.         The editor will save the data in a file.  You then need to cut and
  49.         paste that data into your actual program.  The data will be an array
  50.         of hexadecimal values.  The array is usually named MyCursor (why
  51.         am I talking in short, choppy sentences?).  Now, you need to declare
  52.         2 variables, I suggest ArrayOffset and ArraySegment, and declare them
  53.         as type word.  Example: ArrayOffset, ArraySegment : Word;
  54.         You also need to know the horizontal and vertical hotspots of the 
  55.         cursor.  To help you understand these terms, I'll give you an example:
  56.         the normal mouse cursor, the arrow, has a hotspot located at the very
  57.         tip of it.  When you click on something, you have to position the 
  58.         cursor so that the TIP actually is on the area you want to click on.
  59.         That's the hotspot, the area of the cursor that's used to click with.
  60.         Now, how do we find the offset and segment?  Just use the following 
  61.         code (assuming you kept the variables names the same, and that the 
  62.         name of your mouse cursor array is MyCursor):
  63.         ArrayOffset:=Ofs(MyCursor);
  64.         ArraySegment:=Seg(MyCursor);
  65.         Pretty easy (I hope).  Now, you just need to cal ChangeCursor.  
  66.         Once again, assuming you kept the variable names the same, call it
  67.         like this:
  68.         ChangeCursor(ArrayOffset, ArraySegment, hhs, vhs);
  69.         NOTE: hhs is the horizontal hotspot (substitute in a number here)
  70.         and vhs is the vertical hotspot.  That's it, you now have a new 
  71.         cursor!  If you STILL are  stuck, I'll be nice and let you contact
  72.         me for help, even though only registered users are allowed to do so.
  73.         NOTE: You may ONLY ask for help on this topic if you are an 
  74.         UNREGISTERED user.  You can send me a letter (see address in 
  75.         REGISTER.TXT), or (preferred), send me email to:
  76.         psilocyn@ix.netcom.com
  77.  
  78.